package com.cwf.system.entity;

import java.util.Date;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.IdType;
import com.cwf.system.vo.ValidGroup;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.experimental.SuperBuilder;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

/**
 * (Dictionary)表实体类
 *
 * @author makejava
 * @since 2023-02-19 20:55:54
 */
@SuppressWarnings("serial")
@Data
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
@TableName("dictionary")
public class Dictionary  {
    //id@TableId
    @Null(groups = ValidGroup.Crud.Create.class, message = "不需要填写id")
    @NotNull(groups = ValidGroup.Crud.Update.class,message = "id不能为空")
    @NotNull(groups = ValidGroup.Crud.Delete.class,message = "id不能为空")
    @TableId(type = IdType.AUTO)
    private Long id;

    //中文名
    @NotNull(groups = ValidGroup.Crud.Create.class, message = "中文名不能为空")
    @Length(max = 10)
    private String chineseName;
    //英文名
    @NotNull(groups = ValidGroup.Crud.Create.class, message = "英文名不能为空")
    @Length(max = 10)
    private String englishName;
    //简介
    @NotNull(groups = ValidGroup.Crud.Create.class, message = "简介不能为空")
    @Length(max = 100)
    private String des;
    //状态
    @NotNull(groups = ValidGroup.Crud.Create.class, message = "状态不能为空")
    private Integer state;
    //逻辑删除
    private Integer isDelete;
    //创建时间
    private Date createTime;
    //更新时间
    private Date updateTime;



}
